package com.bdqn.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bdqn.common.utils.PageUtils;
import com.bdqn.gulimall.order.entity.OrderEntity;
import com.bdqn.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单表
 *
 * @author cxk&xp&fg
 * @email 200224242@qq.com
 * @date 2022-01-20 17:41:27
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);


    /**
     * 获取当前订单的支付信息
     * @return
     */
    PayVo getOrderPay(String orderSn);

    /**
     * 查出订单详情数据
     * @param params
     * @return
     */
    PageUtils queryPageWithItem(Map<String, Object> params);

    /**
     * 订单确认页返回需要用的数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    /**
     * 下单操作
     * @param vo
     * @return
     */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    /**
     * 处理支付结果
     * @param vo
     * @return
     */
    String handlePayResult(PayAsyncVo vo);
}

